Pumpjack torque fill estimation

ABSTRACT

The fill of a downhole pump of a pumpjack or other system may be estimated based on a dynamically changing a reference torque or force curve and actual torque or force measurements during at least a portion of a pump stroke. Using various techniques, the reference curve may dynamically change over time to take into account slowly changing operating conditions. Moreover, the reference curve and/or the measurements may be adjusted to ensure that the estimated and/or reported pump fill does not exceed 100 percent of pump capacity.

BACKGROUND

Traditional techniques for estimating pump fillage in a pumpjack system suffer from various drawbacks. For instance, downhole cards physically located in the well at the downhole pump have been used historically. However, the downhole card must be removed from the well periodically and analyzed to determine historical pump fill.

Other systems estimate pump fill based on measurements of torque experienced by the pumpjack system. However, such systems typically require repeated and frequent calibration, and sometimes provide wildly inaccurate readings. Occasionally, the readings even represent unrealistic pump fill estimates (such as pump fill being greater than 100 percent). The need for frequent calibration can result in an undesirable amount of human intervention, and the unrealistic readings can cause a user to lose faith in the pump fill estimating system.

SUMMARY

Various aspects are described herein that may provide, for example, systems, methods, and software for determining pump fill based on measured torque, without necessarily requiring as much calibration and/or manual intervention. Moreover, such systems, methods, and software may potentially provide a more accurate pump fill estimate while not letting the estimate represent an unrealistic quantity, such as a quantity exceeding a full pump (e.g., exceeding 100 percent pump fill).

For example, a reference torque or force curve may be maintained and dynamically updated based on current torque or force measurements obtained for at least a portion of a stroke, such as at least a portion of a down stroke. The pump fill estimate may be determined based on the reference curve and the actual measurements. Using various techniques, the reference curve may dynamically change over time to take into account slowly changing operating conditions. This may potentially reduce or even eliminate some or all of the previously utilized calibration operations. Moreover, the reference curve and/or the measurements may be adjusted to ensure that the estimated and/or reported pump fill does not exceed 100 percent of pump capacity.

The techniques described herein may be utilized in connection with various types of pump systems, such as but not limited to a pumpjack system for pumping water and liquid oil, and for producing natural gas from a well.

These and other aspects of the disclosure will be apparent upon consideration of the following detailed description.

BRIEF DESCRIPTION OF THE DRAWINGS

A more complete understanding of the present disclosure and the potential advantages of various aspects described herein may be acquired by referring to the following description in consideration of the accompanying drawings, in which like reference numbers indicate like features, and wherein:

FIG. 1 is a cross-sectional view of an example pumpjack system;

FIG. 2 is a cross-sectional view of an example downhole pump in operation during an up stroke;

FIG. 3 is a cross-sectional view of an example downhole pump in operation during a down stroke;

FIG. 4 is a graph of an example torque curve representing a stroke cycle;

FIG. 5 is a flow chart showing example steps that may be performed to estimate the pump fill based on torque measurements;

FIG. 6 is a graph of an example series of torque measurements compared with a previous reference peak;

FIG. 7 is a graph of the torque measurements of FIG. 6 overlaid with the previous reference peak and an example of a current reference torque curve;

FIG. 8 is a graph of the current reference torque curve of FIG. 7 after being adjusted;

FIG. 9 is a graph of another example of a series of torque measurements and a reference torque curve;

FIG. 10 is a graph of the reference torque curve of FIG. 9 after being adjusted;

FIG. 11 is a flow chart showing example steps that may be performed to estimate the pump fill based on force measurements; and

FIG. 12 is a block diagram of an example controller that may be used to perform various functions, including some or all of the steps described in connection with FIG. 5 or 11.

DETAILED DESCRIPTION

FIG. 1 is a cross-sectional view of an example pumpjack system 100. Such a system 100 may include an above-ground structure that includes a walking beam 101 onto which a horse head 102 is mounted. Walking beam 101 may reciprocate so as to move horse head 102 upward (up stroke) and downward (down stroke) on a periodic basis. To move walking beam 101, a controller 130 may command a prime mover 105 (such as a motor) to send rotational power to a transmission 104, which may include a gear reducer that causes a crank arm and counter weight 103 to rotate at a reduced rotational speed and increased torque relative to prime mover 105. Because counter weight 103 is offset from its rotational axis, this causes an arm attached to walking beam 101 to move walking beam 101 in a reciprocating manner.

As horse head 102 moves up and down, this causes a string 106 (also known as a birdie) that is usually made of a steel cable to also move up and down. In turn, this movement causes a polished rod 107 to move up and down through a lubricated stuffing box 108, which in turn causes a sucker rod 113 (typically made of a series of longitudinally interconnected steel rods) attached to the lower end of polished rod 107 to also move up and down.

Sucker rod 113 extends downward into a well in ground 122, through tubing 114 to a downhole pump 117. A hollow annular region, referred to herein as annulus 115, encircles tubing 114 and is disposed between tubing 114 and an outer casing 116. Casing 116 includes a series of perforations 121 that expose annulus 115 to an oil or gas bearing region 123 of ground 122. Liquids, such as oil and water, and gases, such as hydrocarbon gases (e.g., methane, ethane, etc.) enter perforations 121 into annulus 115 through a combination of outside pressure and a vacuum produced by downhole pump 117. Liquids fall to the bottom of annulus 115 due to gravity, and gases (being lighter than the liquids) rise upward in annulus 115.

Downhole pump 117 may include a standing valve 119, a travelling valve 120 coupled to sucker rod 113, and a hollow region referred to as a pump barrel 118 disposed between the standing and travelling valves 119, 120. Downhole pump 117 typically operates as follows. Referring to FIG. 2, as sucker rod 113 moves in an up stroke, liquid above travelling valve 120 causes travelling valve 120 to close, and so the upward movement creating a vacuum between travelling valve 120 and standing valve 119. This causes standing valve 119 to open, allowing liquid that has accumulated at the bottom of annulus 115 to be drawn up through standing valve 119. Meanwhile, if tubing 114 is sufficiently already full of previously pumped liquids, then the liquid at the top of the liquid stack in tubing 114 is pushed upward an outward through a junction 109 and an exit tube 110 for collection and/or disposal.

On the down stroke (FIG. 3), sucker rod 113 moves downward, also causing travelling valve 120 to move downward. This produces a relatively higher pressure between travelling valve 120 and standing valve 119, causing it to open and travel downward through the liquid that previously passed through standing valve 119 on the up stroke. The higher pressure also causes standing valve 119 to close, thereby forcing the previously-drawn liquid to remain in place while travelling valve 120 moves downward through that liquid. By alternating up and down strokes, downhole pump 117 may therefore draw liquids that have fallen to the bottom of annulus 115 up and out of the well.

As previously explained, while liquids fall to the bottom of annulus 115, gases tend to rise upward in annulus 115. Thus, depending upon the level of the liquid at the bottom of annulus 115 relative to the intake of downhole pump 117, gases are ideally not pumped through downhole pump 117. Instead, gases may be collected and/or disposed of from the well through an exit tube 111 disposed at or near the top of annulus 115. A measurement device 112 may be coupled to exit tube 111 for measuring the volume and/or rate of the gas traveling through exit tube 111.

Depending upon the desired product to be produced by the well, either the gas, or the liquid, or both the gas and the liquid may be considered a production product. Likewise, depending upon what is desired, the gas or the liquid may be considered a waste product. For example, depending upon where the well is located, the well may produce an excellent supply of oil, whereas the gas also produced may be an unwanted byproduct or it may be a useful product. In this case, downhole pump 117 may be used to pump the desirable oil (along with other liquids such as water). Or, where gas is considered the main product to be produced by the well, such as where the well is located in a region that contains little to no liquid petroleum product to be extracted, then the waste liquid may primarily include water (with various contaminants). In this case, the downhole pump 117 may be used to draw up the waste liquid simply to prevent annulus 115 to become full of the liquid and thereby preventing the desirable gas product from entering annulus 115.

Pumpjack system 100 may operate continuously or on a periodic basis, under the control of controller 130. For example, controller 130 may cause prime mover 105 to continuously run so as to cause pumpjack system 100 to perform a series of stroke cycles (each stroke cycle including a pair of an upstroke and a downstroke). Such continuous operation may carry on until a pump off condition occurs. A pump off condition may occur where, for instance, it is determined that there is insufficient liquid in annulus 115 to be pumped by downhole pump 117. Continuing to pump under such a condition may result in conditions that can cause pump damage. A pump off condition may also occur due to a timeout. For instance, controller 130 may be configured so as to continuously cause pumpjack system 100 to pump for X amount of time or until another pump off condition is met, whichever occurs first. In other examples, pumpjack system 100 may be controlled to perform only a single stroke cycle at a time, with a delay between cycles. In still further examples, pumpjack system 100 may be controlled to adjust the speed of a stroke. The stroke speed, continuous duration, stroke frequency, and/or delay between stroke cycles may be set so as to, ideally, minimize energy expended, minimize pumpjack system wear, and maximize production. All of these can depend upon a variety of factors. For example, if liquid is drawn through perforations 121 into annulus 115 very quickly and easily, then pumpjack system 100 may need to operate downhole pump 117 more often or on a more continuous basis. Otherwise, the liquid level in annulus 115 may rise too high, reducing the efficiency of the system especially where gas is the desired product (since there will be less room in annulus 115 for the gas). On the other hand, if liquid is not drawn quickly through perforations 121, then the liquid level may be too low in annulus 115 unless pumping is reduced. As discussed above, this may allow gas to be pumped up through downhole pump 117, potentially causing gas lock and/or equipment damage.

As can be seen, there is accordingly a level, or range of levels, at which the liquid level in annulus 115 should be maintained to provide a desired system efficiency. In an ideal world, one might directly measure the liquid level and control pumpjack system 100 based on the direct measurement. While such an arrangement has been proposed, this is not always practical, because downhole pump 117 may be located extremely deep into the earth and subject to intense environmental conditions, making the sensor, and maintenance thereof, expensive. Moreover, such an arrangement would involve finding a way for the remote underground sensor to communicate with the above-ground control system, thereby raising an additional challenge.

Another way to control a pumpjack is to measure the mechanical force experienced by certain system components over the duration of an upstroke and/or a downstroke. Force may be measured in a variety of ways, such as using a conventional downhole card inside the well and/or a dynamometer coupled to an above-ground portion of the pumpjack system. When the measured force is graphed against the displacement of the travelling valve of the downhole pump (or against the displacement of any other reciprocating or rotating portion of the pumpjack), such a graph results in a curve that is known to provide useful information about the conditions experienced by the downhole pump.

Another way to control a pumpjack is to measure the torque experienced by a component of the pumpjack such as the prime mover 105. Torque may be measured in a variety of ways, such as using an ammeter on current fed to a prime mover 105 (if prime mover 105 is an electric motor). When the measured torque is graphed against the displacement of a reciprocating component of the pumpjack system such as the reciprocating polished rod 107, such a graph results also in a curve that is known to provide useful information about the conditions experienced by the pumpjack system 100. FIG. 4 shows an example of a typical torque curve for one stroke cycle.

As can be seen in the FIG. 4 example, the upstroke portion of the torque curve extends from the lowest displacement value (where the polished rod 107 or other reciprocating component is in the lowest position) to the highest displacement value, and the downstroke portion of the torque curve extends from the highest displacement value to the lowest displacement value. Of course, displacement may be alternatively defined in the reverse direction.

As mentioned previously, it is well-known that the shape of such a torque curve can provide information about the conditions experienced by the downhole pump. For example, such a torque curve may be used to estimate the percentage fill of the downhole pump for a given stroke cycle. Because pump fill may be a proxy for annulus liquid level, the pump fill as estimated from the torque curve may also be used to determine whether a pump-off condition has occurred or is imminent. In addition, some pumpjack controllers may report the estimated pump fill to the pumpjack user, such as via a display device, meter, or other indicating device.

There are various problems with conventional ways of estimating and reporting pump fill using a torque curve. For one thing, a system implanting such a pump fill estimator must typically be calibrated on a periodic basis due to slowly changing conditions in the well. For instance, the pressure and/or viscosity of the liquid surrounding the well may change over time. Also, the pumpjack mechanism itself may change characteristics as the system parts wear over time and/or lubrication between parts changes. Calibration is an time-consuming process that may involve human intervention and/or down-time of the pumpjack system. The energy and time consumed for calibration is therefore undesirable if it can be avoided.

Another problem with conventional pump fill estimators is that, due to the above issues with de-calibration, sometimes the reported pump fill may be greater than 100 percent. While a user will clearly understand that such a pump fill is not possible, the user may lose confidence in the reported pump fill. If another pump fill estimator is available to the user that does not report such impossible or unlikely results, that user may be more confident in, and be more likely to want to use, that pump fill estimator. Such a pump fill estimator would be even more desirable if it needed less (or even no) calibration.

As will be described in further detail, a downhole pump fill estimation and control technique is described, in which at least a portion of the torque curve (such as the down stroke portion) may be compared with a dynamic reference curve to estimate torque fill. The reference curve may change over time (e.g., for each stroke) to take into account previous torque measurements, thereby potentially also taking into account slowly changing operating conditions that would otherwise confound conventional pump fill estimation techniques. Moreover, the reference curve may be elastic; that is, the reference curve may be adjusted during a comparison in such a way to prevent or otherwise inhibit the comparison between the measured and reference curves prevent from resulting in an estimated torque fill that exceeds 100 percent.

An example of such a pump fill estimation technique will be described with reference to FIG. 5. In the discussion herein, the measured torque curve portion for the ith stroke will be referred to as Tm(i), and the reference torque curve for the ith stroke will be referred to as Tr(i). Each of the Tm(i) and Tr(i) curves may have a peak Pm(i) and Pr(i), respectively. Also, the variables Pmx(i) and Pmy(i) will refer to the x and y coordinates of Pm(i), respectively. Likewise, the variables Prx(i) and Pry(i) will refer to the x and y coordinates of Pr(i), respectively. While it is possible that one or both of these curves at a given ith stroke may have multiple peaks, it will be assumed herein that the “peak” for a given referred to in this technique will be the highest of the peaks in that curve.

Referring to FIG. 5, at step 501, the torque experienced by pumpjack system 100 may be measured for at least a portion of a stroke cycle, such as the down stroke portion. The measurement may be made in any manner desired. An example graph of the down stroke torque measured is shown in FIG. 6, which plots the torque versus downhole pump displacement. In this example, it will be assumed that the stroke is the ith stroke, and so the graph shows the peak Pm(i) of the measured torque curve Tm(i). In this example, the down stroke of Tm(i) begins at labeled point B(i) and ends at labeled point A(i). The curve Tm(i) may be represented by a data series produced and stored in a non-transitory computer-readable medium as a result of sampled torque measurements obtained from the sensing device. From this stored data, step 502 may be performed to determined the x (displacement) and y (torque) coordinates of the peak Pm(i) and of the end points A(i) and B(i).

Next, at step 503, the y-coordinates (representing torque) of the ith measured peak Pm(i) and the previous reference curve peak Pr(i−1) may be compared. Thus, step 503 may involve determining whether Pmy(i) is greater than the Pry(i−1). Of course, in this example it is assumed that a previous reference curve Pm(i−1) is already known. Pm(i−1) may be known from performing the technique of FIG. 5 during the (i−1)th stroke, or, where the present stroke i is the first stroke on which the present analysis is to be performed, the reference curve Pm(i−1) may be predetermined or saved from the previous time that pump jack system 100 was operated. As will be seen, preventing the peak of the current reference curve Pr(i) to have a torque value less than the measured peak Pm(i) may prevent the determined pump fill from exceeding 100 percent.

Suppose, for example, that in step 503 it is determined that Pmy(i) is not greater than Pry(i−1). An example of this situation is shown in FIG. 5. As can be seen, Pr(i−1) has a greater torque (y coordinate value) than Pm(i). In this situation, the process may move to step 504, in which it is determined whether Pm(i) is outside an allowable range as compared with Pr(i−1) or Pm(i−1). The allowable range may be defined as, for instance, a maximum x-coordinate and/or y-coordinate distance between Pm(i) and Pr(i−1), or between Pm(i) and Pm(i−1). In another example, the allowable range may be defined by a circle of a predefined radius centered around Pr(i−1) or Pm(i−1). A purpose of step 504 is to check whether Pm(i) has changed quickly from a previous measurement, because if it has, then this may be an indication that the torque measurement could be erroneous or subject to a transient condition, in which case it may be desirable to treat the present torque measurement differently (as will be discussed below with regard to step 511).

If Pm(i) is determined at step 504 not to be within the allowable range, then the current coordinates of Pm(i) may be ignored for purposes of determining the current reference curve Tr(i), and the process may move to step 511. At step 511, the current reference curve Tr(i), along with its peak Pm(i), may be set equal to Tr(i−1) and Pm(i−1). In other words, the previous reference curve may be used. The process may then move to step 509, which will be discussed below. Alternatively, the process may skip the remainder of the FIG. 5 process and may simply wait for another set of torque measurements on the next stroke. The system may also count the number of times that this occurs, and if the count meets or exceeds a predetermined threshold, then an error indication may be provided to the user.

On the other hand, if, at step 504, Pm(i) is determined to be within the allowable range, then at steps 506 and 507 the x and y coordinates of Pr(i) are determined. In this example, Prx(i) is equal to Prx(i−1) summed with a delta value referred to herein as Δx, and Pry(i) is equal to Pry(i−1) summed with a delta value referred to herein as Δy. In other words, Pr(i) may be determined by moving Pr(i−1) by a delta vector (Δx, Δy). The delta vector may be determined by the most recently measured peak, Pm(i), and may cause the reference peak to move toward the most recently measure peak. Thus, for instance, Δx and Δy may depend upon a difference between Pr(i−1) and Pm(i). For instance, the delta vector (Δx, Δy) may be determined as follows:

Δx=Kx[Pmx(i)−Prx(i−1)], and Δy=Ky[Pmy(i)−Pry(i−1)],

where Kx and Ky may be constant or variable multipliers that each may generally be expected to be less than 1.0, such as in the range of 0.1 to 0.5. K1 and K2 may be equal or unequal. Using the above, the following is an example of a relationship that may exist between Pr(i) and Pr(i−1), and that may be implemented by steps 506 and 507:

Prx(i)=Prx(i−1)+Kx[Pmx(i)−Prx(i−1)], and

Pry(i)=Pry(i−1)+Ky[Pmy(i)−Pry(i−1)].

The above is merely an example. In general, a purpose of this calculation may be to allow the peak of the reference curve to dynamically change over time by slowly moving toward new measured peaks, to take into account slowly changing operating conditions. Thus, it can be seen that various other linear and non-linear relationships between Pr(i) and Pr(i−1) are also possible.

An example of the result of the determination in steps 506 and 507 is shown in FIG. 7. In this example, Pm(i) has a lower y (torque) value and a higher x (displacement) value than Pr(i−1). Thus, the newly determined Pr(i) may be expected to move toward Pm(i), which is the case as shown. In the example of FIG. 7, K1 and K2 are both equal to about 0.4.

FIG. 7 also shows Tr(i), which may be determined at step 508. Tr(i) passes, of course, through its peak Pr(i), and may have endpoints A(i) and B(i). Given these constraints, the curve itself may be determined in any manner desired. For example, a curve-fitting technique may be used to provide, for example, a first order curve containing the three points Pr(i), A(i) and B(i). Or, a linear function may be used to define a first “line” between A(i) and Pr(i) and a second “line” between Pr(i) and B(i). These “lines” may actually appear on a linear-linear graph of torque versus displacement as curves where torque sampling is performed at a constant rate. This is because pumpjack system 100 may actually cause downhole pump 117 to move at a non-constant rate during a down stroke. In particular, downhole pump 117 generally accelerates from the top of the down stroke toward the middle of the down stroke, and then decelerates from the middle toward the end of the down stroke. Thus, a set of torque samples taken at a constant rate may actually be taken at non-constant displacement intervals.

In other embodiments, torque may be plotted against time as the x-axis (rather than against displacement as the x-axis), in which case both the measured and reference torque curves may appear quite differently. However, this does not change the principles of the present discussion, and either type of measured and reference torque curves may be used. Also, the x and y axes may be reversed without affecting the principles set forth herein.

Once the current reference curve Tr(i) is determined, then at step 509 it is determined whether Tr(i) needs to be adjusted. As will be discussed further below, the estimated pump fill may be determined based on the areas under Tm(i) and Tr(i). If the area under Tr(i) is less than the area under Tm(i), then the estimated pump fill may be greater than 100 percent. Accordingly, it may be desirable to make Tr(i) elastic by adjusting it to prevent the area under Tr(i) from being less than the area under Tm(i). In addition to adjusting the peak Pr(i) of the reference curve to conform toward existing operating conditions, this adjustment may also allow Tr(i) as a whole to conform more accurately toward existing operating conditions.

One possible way to adjust Tr(i) is discussed with reference to FIGS. 7 and 8. As shown in FIG. 7, Tr(i) has a greater torque in the y-axis than Tm(i), except on the left-hand side of the graph as indicated by arrows. For each displacement value where the torque value of Tr(i) falls below Tm(i), the torque value of Tr(i) may be set to be equal to the torque value of Tm(i). The result of this adjustment is shown in FIG. 8. Such an adjustment technique guarantees that the area under Tr(i) will not be less than the area under Tm(i). Other adjustment techniques that provide such a guarantee may alternatively be implemented. For example, Tr(i) may be multiplied across the entire curve (or a portion thereof) by a factor determined to cause the area under Tr(i) to be no less than the area under Tm(i). In other possibilities, one or both of Tr(i) Tm(i) may be adjusted in some manner such that the area under Tr(i) is not less than the area under Tm(i).

Next, at step 510, the pump fill may be estimated based on the area under the adjusted Tr(i) (or the original Tr(i) if not adjusted) and the area under Tm(i). These areas will be referred to herein respectively as AreaTr(i) and AreaTm(i). The pump fill may be determined to be, for example, 1−[[AreaTr(i)−AreaTm(i)]/AreaTr(i)]. The result of this subtraction may further be multiplied by 100 to obtain a percentage. In other example embodiments, the denominator of the fraction may be Area Tm(i) or may be based on both AreaTr(i) and AreaTm(i), such as an average or median of the two areas. In still further embodiments, the pump fill may be determined on a different scale, and so the above equations may be, for instance, multiplied by an appropriate scaling factor.

Determining the area under each curve may be performed in a variety of ways. For example, the area under each curve may be determined by summing the torque values of the respective curve, without taking into account the non-linear differences between the displacement values. In another example, the area under each curve may be determined by summing the torque values, each torque value being multiplied by a difference between the respective displacement value and a neighboring displacement value. In a still further embodiment, any of various known integration techniques may be used. As can be seen, the “area” referred to herein may not be a true area relative to how the curves might be visualized on a graph. In many embodiments, the area under a curve may be determined based on a weighted or non-weighted sum of the torque values of the curve. The area under a down stroke torque curve may represent, or at least represent an estimate of, the amount of work performed on the down stroke.

The above discussion has been with reference to examples where Pry(i−1) is greater than or equal to Pmy(i), as determined at step 503. However, if at step 503 it is determined that the opposite is true, then Pry(i) may be determined in a different manner. It may be desirable to ensure that Pry(i) is at least as great as Pmy(i) to ensure that AreaTr(i) is not less than AreaTm(i). Thus, in this situation, at step 505, Pry(i) may be set to be equal to Pmy(i). In an alternative embodiment, step 506 may be performed as usual, except that Δy may be equal to Pmy(i)−Pry(i−1).

An example of this situation is shown in FIG. 9. As can be seen in this example, the y-value (torque value) of the peak of the reference curve is set equal to the y-value of the peak of the measured torque curve. However, the x-value (displacement value) of the reference curve peak may be determined per step 507. In other embodiments, Prx(i) may also be set equal to Pmx(i). As described previously, this curve may also be adjusted at step 509, an example result of which is shown in FIG. 10.

As mentioned previously, either torque or force may be used to perform pump fill analysis. Where force is used instead of torque, the force may be measured at any moving part of the system 100, such as but not limited to measuring forces experienced at downhole pump 117, sucker rod 113, polished rod 107, or string 106. In many of the examples discussed previously, measured torque curves were compared with reference curves. A nearly identical technique may be implemented comparing measured force curves with appropriate reference curves, with a minor modification being that the measured force curve may be inverted prior to comparison with the reference curve.

It may be expected that a typical measured force curve, if plotted against displacement or time sample, may have a dipped profile (dipping between points A(i) and B(i)) rather than a peaked profile (having a definitive peak between points A(i) and B(i)). Moreover, the low point of the dip may likely be skewed toward the beginning of the down stroke, near point B(i). FIG. 11 shows an example process that may be used with measured force curves rather than measured torque curves. Steps 1101-1111 may be identical to steps 501-511, except that “torque” is replaced with “force,” the measured force curve is referred to as Fm(i), and the reference force curve is referred to as Fr(i). The other difference is that step 1112 is inserted between steps 1101 and 1102, which normalizes and inverts the measured force so as to produce a curve having a peak Pm(i). For example, if Fm(i) is normalized to extend one a scale between a force of zero and an upper limit of force=Fmax, then to invert Fm(i) one may perform the following: Fm(i)=Fmax−Fm(i). In some embodiments, it may be that Fmax=1. In further embodiments, Fm(i) does not need to be normalized prior to inversion. Because the other steps are otherwise identical to those described in FIG. 5, they do not need to be described again.

Any of the functions and steps described herein may be performed and/or controlled by controller 130. An example block diagram of controller 130 is shown in FIG. 12. Controller 130 may be or otherwise include a computer, and may include hardware that is hard-wired to perform specific functions and/or hardware that may execute software to perform specific functions. The software, if any, may be stored on a non-transitory computer-readable medium 1202 in the form of computer-readable instructions. Controller 130 may read those computer-readable instructions, and in response perform various steps as defined by those computer-readable instructions. Thus, for example, any of the steps described in connection with FIG. 5 or 11 may be implemented, for example, by reading and executing such computer-readable instructions for performing those functions, and/or by any hardware subsystem (e.g., a processor 1201) from which controller 130 is composed. Processor 1201 may be implemented as, for example, a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), and/or a programmable logic controller (PLC). Additionally or alternatively, any of the above-mentioned functions may be implemented by the hardware of controller 130, with or without the execution of software.

Computer-readable medium 1202 may include not only a single physical non-transitory storage medium or single type of such medium, but also a combination of one or more such storage media and/or types of such media. Examples of computer-readable medium 1202 include, but are not limited to, one or more memory chips, hard drives, optical discs (such as CDs or DVDs), magnetic discs, and magnetic tape drives. Computer-readable medium 1202 may be physically part of, or otherwise accessible by, controller 130, and may store computer-readable instructions (e.g., software) and/or computer-readable data (i.e., information that may or may not be executable).

Controller 130 may also include a user input/output interface 1203 for receiving input from a user (e.g., via a keyboard, mouse, and/or remote control) and/or for providing output to the user (e.g., via display device, an audio speaker, and/or a printer). For example, user input/output interface 1203 may be used to indicate the pump fill as determined at step 510 or step 1110.

Controller 130 may further include a pump driver 1204 for controlling whether prime mover 105 will operate to cause pumping action. For example, pump driver 1204 may cause prime mover 105 to turn on and off as desired. In some embodiments, controller 130, via pump driver 1204, may cause prime mover 105 to turn on or off, or otherwise adjust its operation, in response to the determined pump fill meeting one or more predetermined conditions such as exceeding or falling below a threshold. For example, if the pump fill as determined at steps 510 or 1110 falls below a certain threshold for a certain number of strokes, then controller 130 may consider this a pump off condition and may turn off prime mover 105 for a determined amount of time. Alternatively or additionally, controller 130 may provide an audible, visual, and/or other type of alert (e.g., send a wireless signal) responsive to the determined pump fill meeting the predetermined condition(s).

Thus, various example systems, methods, and software have been described that may be used to determine pump fill based on torque, without necessarily requiring as much calibration and/or manual intervention. Moreover, such systems, methods, and software may potentially provide a more accurate pump fill estimate while not letting the estimate represent an unrealistic quantity, such as a quantity exceeding a full pump (e.g., exceeding 100 percent pump fill). While embodiments of the present invention have been illustrated and described, it is not intended that these embodiments illustrate and describe all possible forms of the present invention. Rather, the words used in the specification are words of description rather than limitation, and it is understood that various changes may be made without departing from the spirit and scope of the present disclosure. 

1. A method for estimating pump fill, comprising: receiving data representing a series of torque or force measurements through a portion of a stroke of a pump; determining, by a computer, a reference torque or force curve based on a previous reference curve and the series of torque or force measurements; and determining, by the computer, an estimated pump fill of the pump based on the reference curve and the series of measurements.
 2. The method of claim 1, further comprising determining a peak measurement of the series of measurements, wherein determining the reference curve comprises determining a peak of the reference curve based on a peak of the previous reference curve and the peak measurement.
 3. The method of claim 2, wherein determining the peak of the reference curve comprises determining the peak of the reference curve based on a difference between the peak of the previous reference curve and the peak measurement.
 4. The method of claim 1, further comprising: determining a first area represented by the series of measurements; and determining a second area represented by the reference curve, wherein determining the estimated pump fill comprises determining the estimated pump fill based on a difference between the first and second areas.
 5. The method of claim 1, further comprising: determining whether any portion of the determined reference curve has values smaller than a corresponding subset of the series of measurements; and for any determined said portion, adjusting said portion of the determined reference curve so that said portion no longer has values smaller than the corresponding subset of the series of measurements, wherein said determining the estimated pump fill is performed after said adjusting.
 6. The method of claim 1, wherein the portion of the stroke of the pump is at least a portion of a down stroke of the pump.
 7. The method of claim 1, further comprising displaying a human-readable indication of the determined estimated pump fill.
 8. The method of claim 1, wherein the pump is a downhole pump of a pumpjack system, and wherein the measurements represent torque or force experienced by the pumpjack system.
 9. The method of claim 1, wherein the computer comprises a programmable logic controller.
 10. A computer for estimating pump fill, comprising: a processor; and a non-transitory computer-readable medium storing computer-executable instructions for performing a method, such that when executed, the computer-executable instructions cause the computer to perform steps comprising: receiving data representing a series of torque or force measurements through a portion of a stroke of a pump, determining a reference torque or force curve based on a previous reference curve and the series of torque or force measurements, and determining an estimated pump fill of the pump based on the reference curve and the series of measurements.
 11. The computer of claim 10, wherein the steps further comprise determining a peak measurement of the series of measurements, wherein determining the reference curve comprises determining a peak of the reference curve based on a peak of the previous reference curve and the peak measurement.
 12. The computer of claim 11, wherein determining the peak of the reference curve comprises determining the peak of the reference curve based on a difference between the peak of the previous reference curve and the peak measurement.
 13. The computer of claim 10, wherein the steps further comprise: determining a first area represented by the series of measurements; and determining a second area represented by the reference curve, wherein determining the estimated pump fill comprises determining the estimated pump fill based on a difference between the first and second areas.
 14. The computer of claim 10, wherein the steps further comprise: determining whether any portion of the determined reference curve has values smaller than a corresponding subset of the series of measurements; and for any determined said portion, adjusting said portion of the determined reference curve so that said portion no longer has values smaller than the corresponding subset of the series of measurements, wherein said determining the estimated pump fill is performed after said adjusting.
 15. The computer of claim 10, wherein the portion of the stroke of the pump is at least a portion of a down stroke of the pump.
 16. The computer of claim 10, further comprising a display device, wherein the steps further comprise causing the display device to display a human-readable indication of the determined estimated pump fill.
 17. The computer of claim 10, wherein the pump is a downhole pump of a pumpjack system, and wherein the measurements represent torque or force experienced by the pumpjack system.
 18. The computer of claim 10, wherein the processor comprises a programmable logic controller.
 19. A non-transitory computer-readable medium storing computer-executable instructions for estimating pump fill, such that when executed, the computer-executable instructions cause a computer to perform steps comprising: receiving data representing a series of torque or force measurements through a portion of a stroke of a pump; determining a reference torque or force curve based on a previous reference curve and the series of torque or force measurements; and determining an estimated pump fill of the pump based on the reference curve and the series of measurements.
 20. The non-transitory computer-readable medium of claim 19, wherein the steps further comprise determining a peak measurement of the series of measurements, wherein determining the reference curve comprises determining a peak of the reference curve based on a peak of the previous reference curve and the peak measurement.
 21. The non-transitory computer-readable medium of claim 20, wherein determining the peak of the reference curve comprises determining the peak of the reference curve based on a difference between the peak of the previous reference curve and the peak measurement.
 22. The non-transitory computer-readable medium of claim 19, wherein the steps further comprise: determining a first area represented by the series of measurements; and determining a second area represented by the reference curve, wherein determining the estimated pump fill comprises determining the estimated pump fill based on a difference between the first and second areas.
 23. The non-transitory computer-readable medium of claim 19, wherein the steps further comprise: determining whether any portion of the determined reference curve has values smaller than a corresponding subset of the series of measurements; and for any determined said portion, adjusting said portion of the determined reference curve so that said portion no longer has values smaller than the corresponding subset of the series of measurements, wherein said determining the estimated pump fill is performed after said adjusting.
 24. The non-transitory computer-readable medium of claim 19, wherein the portion of the stroke of the pump is at least a portion of a down stroke of the pump.
 25. The non-transitory computer-readable medium of claim 19, wherein the steps further comprise causing a display device to display a human-readable indication of the determined estimated pump fill.
 26. The non-transitory computer-readable medium of claim 19, wherein the pump is a downhole pump of a pumpjack system, and wherein the measurements represent torque or force experienced by the pumpjack system. 